package com.xzy.learn.spring.lookup.config;

import com.xzy.learn.spring.entity.User;
import org.springframework.context.annotation.Bean;

/**
 * @author xzy.xiao
 * @date 2022/6/6  15:57
 */
public class ChildBeanFactoryConfig {
    @Bean
    public User user1() {
        System.out.println("create user1 defined in child bean factory");
        return new User(1001L, "use1 defined in child bean factory");
    }

    @Bean
    public User user2() {
        System.out.println("create user2 defined in child bean factory");
        return new User(1002L, "use2 defined in child bean factory");
    }

    @Bean
    public User user3() {
        System.out.println("create user3 defined in child bean factory");
        return new User(1003L, "use3 defined in child bean factory");
    }
}
